home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
ai
/
gaf200b
/
example
/
robotarm.dat
< prev
next >
Wrap
Text File
|
1994-06-25
|
4KB
|
129 lines
SIM_SEGMENT Fdbck_Data
CYCLE_TIME 0.05
! Name MIN MAX
INOUT Movement (-50.0, 50.0)
IN Current (-1.0, 1.0)
INOUT Position (0.0, 70.0)
IN Reference(0.0, 70.0)
LOCAL Last_move(-50.0, 50.0)
IN Pos_reg (0, 1)
ENABLE = Pos_reg OR ( CURRENT > 0.1 AND CURRENT < -0.1 ) OR
( MOVEMENT > 0.5 AND MOVEMENT < -0.5 );
INITIALIZATION
Last_move = Movement;
Position = 0;
Movement = 0;
RESET
Last_move = Movement;
Movement = 0;
PRE_PROCESSING
Position = DELTA_TIME * ( Movement + Last_move ) / 2 + Position;
Last_move = Movement;
END;
PRESET ! 0
! Reference = 70;
Position = 0;
END;
PRESET ! 1
! Reference = 35;
Position = 40;
END;
PRESET ! 2
! Reference = 35;
Position = 0;
END;
PRESET ! 3
! Reference = 35;
Position = 70;
END;
PRESET ! 4
! Reference = 35;
Position = 25;
END;
DATA_TABLE ( Position, Current, Movement )
0 0.4 5
10 0.4 10
20 0.4 40
35 0.4 40
50 0.4 40
60 0.4 10
70 0.4 0
70 -0.4 -5
60 -0.4 -10
50 -0.4 -40
35 -0.4 -40
20 -0.4 -40
10 -0.4 -10
0 -0.4 0
0.0 0.0 0 ;
DATA_TABLE ( Movement, Current, Movement )
-50 +0.4 -40
-45 +0.4 -37
-40 +0.4 -20
-30 +0.4 -10
-20 +0.4 0
-10 +0.4 +10
0 +0.4 +20
+10 +0.4 +30
+20 +0.4 +40
+30 +0.4 +47
+40 +0.4 +50
+45 +0.4 +50
+50 +0.4 +50
!
-50 +0.2 -45
-45 +0.2 -40
-40 +0.2 -30
-30 +0.2 -20
-20 +0.2 -10
-10 +0.2 0
0 +0.2 +10
+10 +0.2 +20
+20 +0.2 +30
+30 +0.2 +40
+40 +0.2 +45
+45 +0.2 +50
+50 +0.2 +50
!
+50 -0.4 +40
+45 -0.4 +37
+40 -0.4 +20
+30 -0.4 +10
+20 -0.4 0
+10 -0.4 -10
0 -0.4 -20
-10 -0.4 -30
-20 -0.4 -40
-30 -0.4 -47
-40 -0.4 -50
-45 -0.4 -50
-50 -0.4 -50
!
+50 -0.2 +45
+45 -0.2 +40
+40 -0.2 +30
+30 -0.2 +20
+20 -0.2 +10
+10 -0.2 0
0 -0.2 -10
-10 -0.2 -20
-20 -0.2 -30
-30 -0.2 -40
-40 -0.2 -45
-45 -0.2 -50
-50 -0.2 -50
!
END Fdbck_Data;